package com.aaa.system.Controller;

import com.aaa.entity.Dept;
import com.aaa.system.service.DeptService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;


@RestController
@RequestMapping("system/dept")
public class DeptController {

    @Autowired
    private DeptService deptService;

    /**
     * 远程调用
     *根据部门id查询部门信息
     */
    @GetMapping("getAllDept/{deptId}")
    public Dept getAllDept(@PathVariable Long deptId){
        return deptService.getAllDeptByDeptId(deptId);
    }
}
